package com.ruoyi.basis.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * 自定义一些系统全局配置
 *
 * @ClassName: SystemGlobalConfig
 * @Author : mashuai
 * @Description: TODO
 */
@Configuration
public class SystemGlobalConfig {

    //文件上传方式，默认local-本地存储.env.development文件修改#VUE_APP_FILE_URL = "/dev-api"即可
    //minio-minio存储，env.development文件修改#VUE_APP_FILE_URL = "minio的ip+端口"
    public static String globalUploadType;
    //文件url，默认0-相对，1-完整(ip+端口取到链接可直接使用)；针对minio方式生效，本地存放都是相对路径
    public static String globalUploadPath;

    @Value("${system.global.uploadType:local}")
    private void setUrl(String val) {
        this.globalUploadType = val;
    }

    @Value("${system.global.uploadPath:0}")
    private void setPath(String val) {
        this.globalUploadPath = val;
    }

}
